package cn.sanshuilin.kst.system.provider.bean;

import javax.persistence.*;
import java.io.Serializable;
import java.sql.Timestamp;

/**
 * @author greenlee
 * @version v1.0
 * @create 创建时间: 2017-12-03 21:00
 * Copyright 2017  by 三水林科技有限公司
 **/
@Entity
@Table(name = "Supply")
public class Supply implements Serializable{
    private String id;
    private String code;
    private String licenseNumber;
    private String licenseTerm;
    private String name;
    private Timestamp pubDate;
    private String pubMemberId;
    private String tax;
    private String validityOfLicense;

    @Id
    @Column(name = "ID", nullable = false, length = 255)
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "Code", nullable = true, length = 255)
    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    @Basic
    @Column(name = "LicenseNumber", nullable = true, length = 255)
    public String getLicenseNumber() {
        return licenseNumber;
    }

    public void setLicenseNumber(String licenseNumber) {
        this.licenseNumber = licenseNumber;
    }

    @Basic
    @Column(name = "LicenseTerm", nullable = true, length = 255)
    public String getLicenseTerm() {
        return licenseTerm;
    }

    public void setLicenseTerm(String licenseTerm) {
        this.licenseTerm = licenseTerm;
    }

    @Basic
    @Column(name = "Name", nullable = true, length = 255)
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "PubDate", nullable = true)
    public Timestamp getPubDate() {
        return pubDate;
    }

    public void setPubDate(Timestamp pubDate) {
        this.pubDate = pubDate;
    }

    @Basic
    @Column(name = "PubMemberID", nullable = true, length = 255)
    public String getPubMemberId() {
        return pubMemberId;
    }

    public void setPubMemberId(String pubMemberId) {
        this.pubMemberId = pubMemberId;
    }

    @Basic
    @Column(name = "Tax", nullable = true, length = 255)
    public String getTax() {
        return tax;
    }

    public void setTax(String tax) {
        this.tax = tax;
    }

    @Basic
    @Column(name = "ValidityOfLicense", nullable = true, length = 255)
    public String getValidityOfLicense() {
        return validityOfLicense;
    }

    public void setValidityOfLicense(String validityOfLicense) {
        this.validityOfLicense = validityOfLicense;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Supply that = (Supply) o;

        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        if (code != null ? !code.equals(that.code) : that.code != null) return false;
        if (licenseNumber != null ? !licenseNumber.equals(that.licenseNumber) : that.licenseNumber != null)
            return false;
        if (licenseTerm != null ? !licenseTerm.equals(that.licenseTerm) : that.licenseTerm != null) return false;
        if (name != null ? !name.equals(that.name) : that.name != null) return false;
        if (pubDate != null ? !pubDate.equals(that.pubDate) : that.pubDate != null) return false;
        if (pubMemberId != null ? !pubMemberId.equals(that.pubMemberId) : that.pubMemberId != null) return false;
        if (tax != null ? !tax.equals(that.tax) : that.tax != null) return false;
        if (validityOfLicense != null ? !validityOfLicense.equals(that.validityOfLicense) : that.validityOfLicense != null)
            return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (code != null ? code.hashCode() : 0);
        result = 31 * result + (licenseNumber != null ? licenseNumber.hashCode() : 0);
        result = 31 * result + (licenseTerm != null ? licenseTerm.hashCode() : 0);
        result = 31 * result + (name != null ? name.hashCode() : 0);
        result = 31 * result + (pubDate != null ? pubDate.hashCode() : 0);
        result = 31 * result + (pubMemberId != null ? pubMemberId.hashCode() : 0);
        result = 31 * result + (tax != null ? tax.hashCode() : 0);
        result = 31 * result + (validityOfLicense != null ? validityOfLicense.hashCode() : 0);
        return result;
    }
}
